<?php
class UserAction extends FrontendAction
{
	public function __construct()
	{
		parent::__construct();
		$this->data['menu']	= 'user';
	}
	
	public function beforeExecute()
	{
		parent::beforeExecute();
		if(!is_numeric($this->data['user']['id']) || $this->data['user']['id']<0)
		{
			if($this->responseType == 'json')
			{
				echo json_encode(array('forward'=>$this->getLoginUrl()));
				exit;
			}
			else
			{
				header('Location:'.$this->getLoginUrl());
			}
		}
	}
}